/*
 * @Author       : NaN 353362604@qq.com
 * @Date         : 2023-06-01 15:10:21
 * @LastEditTime : 2023-06-01 15:11:32
 * @LastEditors  : NaN 353362604@qq.com
 * @FilePath     : \AdminStration\src\Common\Router\MenuNav\ThrRouter\TestType.jsx
 * @Description  :
 */
import { API_LIST } from '../../../Api/Api'
import { ProjectList } from '../Common/Conversion'

const { hostname } = window.location

const SearchList = ['jszx.ljkjkf.com']

export const TestType = async ({ twoData }) => {
    let dataList = {
        uuid: twoData.uuid,
        type: '添加摄像头',
        width: 1000,
        pageSize: 10,
        get: API_LIST()['getCamera'],
        pos: 'posTestTypeCameras',
        assemblyData: ([e]) => ({ testTypeUuid: twoData.uuid, cameraUuid: e.uuid }),
        columns: [
            {
                dataIndex: 'uuid',
                title: '编号',
                type: 'hidden',
                hidden: true,
                hideInTable: true,
                hideInSearch: true,
            },
            {
                dataIndex: 'projectUuid',
                title: '所属项目',
                rules: true,
                type: 'select',
                valueEnum: await ProjectList(),
                hideInTable: !SearchList.includes(hostname),
                hideInSearch: !SearchList.includes(hostname),
            },
            {
                dataIndex: 'organizationName',
                title: '组织机构',
                rules: true,
                type: 'input',
                hideInTable: !SearchList.includes(hostname),
                hideInSearch: !SearchList.includes(hostname),
            },
            {
                dataIndex: 'tableName',
                title: '名称',
                rules: true,
                type: 'input',
            },
            {
                dataIndex: 'cameraPositionName',
                title: '位置',
                rules: true,
                type: 'input',
                hideInSearch: true,
            },
            {
                dataIndex: 'cameraTypeName',
                title: '类别',
                rules: true,
                type: 'input',
                hideInSearch: true,
            },
        ],
    }

    return dataList
}
